package com.itheima.controller;

import com.itheima.common.R;
import com.itheima.pojo.Classification;
import com.itheima.service.ClassifyService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;

/**
 * @author 林晓伟
 */
@RestController
@RequestMapping("/category")
public class ClassifyController {
    @Resource
    private ClassifyService classifyService;

    /**
     * F13-分类列表
     */
    @GetMapping("/list")
    public R fen(){
        List<Classification> fen = classifyService.fen();
        return R.success(fen);
    }
}
